home *** CD-ROM | disk | FTP | other *** search
/ Windows Expert / Windows Expert.iso / windownt / awksrc.zip / NEWS < prev    next >
Text File  |  1992-11-16  |  37KB  |  1,169 lines

  1. Changes from 2.13.2 to 2.14
  2. ---------------------------
  3.  
  4. Updated manual!
  5.  
  6. Added "next file" to skip efficiently to the next input file.
  7.  
  8. Fixed potential of overflowing buffer in do_sprintf().
  9.  
  10. Plugged small memory leak in sub_common().
  11.  
  12. EOF on a redirect is now "sticky" -- it can only be cleared by close()ing
  13.   the pipe or file.
  14.  
  15. Now works if used via a #! /bin/gawk line at the top of an executable file
  16.   when that line ends with whitespace.
  17.  
  18. Added some checks to the grammar to catch redefinition of builtin functions.
  19.   This could eventually be the basis for an extension to allow redefining
  20.   functions, but in the mean time it's a good error catching facility.
  21.  
  22. Negative integer exponents now work.
  23.  
  24. Modified do_system() to make sure it had a non-null string to be passed
  25.   to system(3). Thus, system("") will flush any pending output but not go
  26.   through the overhead of forking an un-needed shell.
  27.  
  28. A fix to floating point comparisons so that NaNs compare right on IEEE systems.
  29.  
  30. Added code to make sure we're not opening directories for reading and such.
  31.  
  32. Added code to do better diagnoses of weird or null file names.
  33.  
  34. Allow continue outside of a loop, unless in strict posix mode.  Lint option
  35.   will issue warning.
  36.  
  37. New missing/strftime.c.  There has been one chage that affects gawk.  Posix
  38.   now defines a %V conversion so the vms conversion has been changed to %v.
  39.   If this version is used with gawk -Wlint and they use %V in a call to
  40.   strftime, they'll get a warning.
  41.  
  42. Error messages now conform to GNU standard (I hope).
  43.  
  44. Changed comparisons to conform to the  description found in the file POSIX.
  45.   This is inconsistent with the current POSIX draft, but that is broken.
  46.   Hopefully the final POSIX standard will conform to this version.
  47.   (Alas, this will have to wait for 1003.2b, which will be a revision to
  48.   the 1003.2 standard.  That standard has been frozen with the broken
  49.   comparison rules.)
  50.  
  51. The length of a string was a short and now is a size_t.
  52.  
  53. Updated VMS help.
  54.  
  55. Added quite a few new tests to the test suite and deleted many due to lack of
  56.   written releases.  Test output is only removed if it is identical to the
  57.   "good" output.
  58.  
  59. Fixed a couple of bugs for reference to $0 when $0 is "" -- particularly in
  60.   a BEGIN block.
  61.  
  62. Fixed premature freeing in construct "$0 = $0".
  63.  
  64. Removed the call to wait_any() in gawk_popen(), since on at least some systems,
  65.   if gawk's input was from a pipe, the predecssor process in the pipe was a
  66.   child of gawk and this caused a deadlock.
  67.  
  68. Regexp can (once again) match a newline, if given explicitly.
  69.  
  70. nextopen() makes sure file name is null terminated.
  71.  
  72. Fixed VMS pipe simulation.  Improved VMS I/O performance.
  73.  
  74. Catch . used in variable names.
  75.  
  76. Fixed bug in getline without redirect from a file -- it was quitting after the
  77.   first EOF, rather than trying the next file.
  78.  
  79. Fixed bug in treatment of backslash at the end of a string -- it was bombing
  80.   rather than doing something sensible.  It is not clear what this should mean,
  81.   but for now I issue a warning and take it as a literal backslash.
  82.  
  83. Moved setting of regexp syntax to before the option parsing in main(), to
  84.   handle things like -v FS='[.,;]'
  85.  
  86. Fixed bug when NF is set by user -- fields_arr must be expanded if necessary
  87.   and "new" fields must be initialized.
  88.  
  89. Fixed several bugs in [g]sub() for no match found or the match is 0-length.
  90.  
  91. Fixed bug where in gsub() a pattern anchorred at the beginning would still
  92.   substitute throughout the string.
  93.  
  94. make test does not assume the . is in PATH.
  95.  
  96. Fixed bug when a field beyond the end of the record was requested after
  97.   $0 was altered (directly or indirectly).
  98.  
  99. Fixed bug for assignment to field beyond end of record -- the assigned value
  100.   was not found on subsequent reference to that field.
  101.  
  102. Fixed bug for FS a regexp and it matches at the end of a record.
  103.  
  104. Fixed memory leak for an array local to a function.
  105.  
  106. Fixed hanging of pipe redirection to getline
  107.  
  108. Fixed coredump on access to $0 inside BEGIN block.
  109.  
  110. Fixed treatment of RS = "".  It now parses the fields correctly and strips
  111.   leading whitspace from a record if FS is a space.
  112.  
  113. Fixed faking of /dev/stdin.
  114.  
  115. Fixed problem with x += x
  116.  
  117. Use of scalar as array and vice versa is now detected.
  118.  
  119. IGNORECASE now obeyed for FS (even if FS is a single alphabetic character).
  120.  
  121. Switch to GPL version 2.
  122.  
  123. Renamed awk.tab.c to awktab.c for MSDOS and VMS tar programs.
  124.  
  125. Renamed this file (CHANGES) to NEWS.
  126.  
  127. Use fmod() instead of modf() and provide FMOD_MISSING #define to undo
  128.   this change.
  129.  
  130. Correct the volatile declarations in eval.c.
  131.  
  132. Avoid errant closing of the file descriptors for stdin, stdout and stderr.
  133.  
  134. Be more flexible about where semi-colons can occur in programs.
  135.  
  136. Check for write errors on all output, not just on close().
  137.  
  138. Eliminate the need for missing/{strtol.c,vprintf.c}.
  139.  
  140. Use GNU getopt and eliminate missing/getopt.c.
  141.  
  142. More "lint" checking.
  143.  
  144.  
  145. Changes from 2.13.1 to 2.13.2
  146. -----------------------------
  147.  
  148. Toward conformity with GNU standards, configure is a link to mkconf, the latter
  149.   to disappear in the next major release.
  150.  
  151. Update to config/bsd43.
  152.  
  153. Added config/apollo, config/msc60, config/cray2-50, config/interactive2.2
  154.  
  155. sgi33.cc added for compilation using cc ratther than gcc.
  156.  
  157. Ultrix41 now propagates to config.h properly -- as part of a general
  158.   mechanism in configure for kludges -- #define anything from a config file
  159.   just gets tacked onto the end of config.h -- to be used sparingly.
  160.  
  161. Got rid of an unnecessary and troublesome declaration of vprintf().
  162.  
  163. Small improvement in locality of error messages.
  164.  
  165. Try to diagnose use of array as scalar and vice versa -- to be improved in
  166.   the future.
  167.  
  168. Fix for last bug fix for Cray division code--sigh.
  169.  
  170. More changes to test suite to explicitly use sh.  Also get rid of 
  171.   a few generated files.
  172.  
  173. Fixed off-by-one bug in string concatenation code.
  174.  
  175. Fix for use of array that is passed in from a previous function parameter.
  176.   Addition to test suite for above.
  177.  
  178. A number of changes associated with changing NF and access to fields
  179.   beyond the end of the current record.
  180.  
  181. Change to missing/memcmp.c to avoid seg. fault on zero length input.
  182.  
  183. Updates to test suite (including some inadvertently left out of the last patch)
  184.   to invoke sh explicitly (rather than rely on #!/bin/sh) and remove some
  185.   junk files.  test/chem/good updated to correspond to bug fixes.
  186.  
  187. Changes from 2.13.0 to 2.13.1
  188. -----------------------------
  189.  
  190. More configs and PORTS.
  191.  
  192. Fixed bug wherein a simple division produced an erroneous FPE, caused by
  193.   the Cray division workaround -- that code is now #ifdef'd only for
  194.   Cray *and* fixed.
  195.  
  196. Fixed bug in modulus implementation -- it was very close to the above
  197.   code, so I noticed it.
  198.  
  199. Fixed portability problem with limits.h in missing.c
  200.  
  201. Fixed portability problem with tzname and daylight -- define TZNAME_MISSING
  202.   if strftime() is missing and tzname is also.
  203.  
  204. Better support for Latin-1 character set.
  205.  
  206. Fixed portability problem in test Makefile.
  207.  
  208. Updated PROBLEMS file.
  209.  
  210. =============================== gawk-2.13 released =========================
  211. Changes from 2.12.42 to 2.12.43
  212. -------------------------------
  213.  
  214. Typo in awk.y
  215.  
  216. Fixed up strftime.3 and added doc. for %V.
  217.  
  218. Changes from 2.12.41 to 2.12.42
  219. -------------------------------
  220.  
  221. Fixed bug in devopen() -- if you had write permission in /dev,
  222.   it would just create /dev/stdout etc.!!
  223.  
  224. Final (?) VMS update.
  225.  
  226. Make NeXT use GFMT_WORKAROUND
  227.  
  228. Fixed bug in sub_common() for substitute on zero-length match.  Improved the
  229.   code a bit while I was at it.
  230.  
  231. Fixed grammar so that $i++ parses as ($i)++
  232.  
  233. Put support/* back in the distribution (didn't I already do this?!)
  234.  
  235. Changes from 2.12.40 to 2.12.41
  236. -------------------------------
  237.  
  238. VMS workaround for broken %g format.
  239.  
  240. Changes from 2.12.39 to 2.12.40
  241. -------------------------------
  242.  
  243. Minor man page update.
  244.  
  245. Fixed latent bug in redirect().
  246.  
  247. Changes from 2.12.38 to 2.12.39
  248. -------------------------------
  249.  
  250. Updates to test suite -- remove dependence on changing gawk.1 man page.
  251.  
  252. Changes from 2.12.37 to 2.12.38
  253. -------------------------------
  254.  
  255. Fixed bug in use of *= without whitespace following.
  256.  
  257. VMS update.
  258.  
  259. Updates to man page.
  260.  
  261. Option handling updates in main.c
  262.  
  263. test/manyfiles redone and added to bigtest.
  264.  
  265. Fixed latent (on Sun) bug in handling of save_fs.
  266.  
  267. Changes from 2.12.36 to 2.12.37
  268. -------------------------------
  269.  
  270. Update REL in Makefile-dist.  Incorporate test suite into main distribution.
  271.  
  272. Minor fix in regtest.
  273.  
  274. Changes from 2.12.35 to 2.12.36
  275. -------------------------------
  276.  
  277. Release takes on dual personality -- 2.12.36 and 2.13.0 -- any further
  278.   patches before public release won't count for 2.13, although they will for
  279.   2.12 -- be careful to avoid confusion!  patchlevel.h will be the last thing
  280.   to change.
  281.  
  282. Cray updates to deal with arithmetic problems.
  283.  
  284. Minor test suite updates.
  285.  
  286. Fixed latent bug in parser (freeing memory).
  287.  
  288. Changes from 2.12.34 to 2.12.35
  289. -------------------------------
  290.  
  291. VMS updates.
  292.  
  293. Flush stdout at top of err() and stderr at bottom.
  294.  
  295. Fixed bug in eval_condition() -- it wasn't testing for MAYBE_NUM and
  296.   doing the force_number().
  297.  
  298. Included the missing manyfiles.awk and a new test to catch the above bug which
  299.   I am amazed wasn't already caught by the test suite -- it's pretty basic.
  300.  
  301. Changes from 2.12.33 to 2.12.34
  302. -------------------------------
  303.  
  304. Atari updates -- including bug fix.
  305.  
  306. More VMS updates -- also nuke vms/version.com.
  307.  
  308. Fixed bug in handling of large numbers of redirections -- it was probably never
  309.   tested before (blush!).
  310.  
  311. Minor rearrangement of code in r_force_number().
  312.  
  313. Made chem and regtest tests a bit more portable (Ultrix again).
  314.  
  315. Added another test -- manyfiles -- not invoked under any other test -- very Unix
  316.   specific.
  317.  
  318. Rough beginning of LIMITATIONS file -- need my AWK book to complete it.
  319.  
  320. Changes from 2.12.32 to 2.12.33
  321. -------------------------------
  322.  
  323. Expunge debug.? from various files.
  324.  
  325. Remove vestiges of Floor and Ceil kludge.
  326.  
  327. Special case integer division -- mainly for Cray, but maybe someone else
  328.   will benefit.
  329.  
  330. Workaround for iop_close closing an output pipe descriptor on Cray --
  331.   not conditional since I think it may fix a bug on SGI as well and I don't
  332.   think it can hurt elsewhere.
  333.  
  334. Fixed memory leak in assoc_lookup().
  335.  
  336. Small cleanup in test suite.
  337.  
  338. Changes from 2.12.31 to 2.12.32
  339. -------------------------------
  340.  
  341. Nuked debug.c and debugging flag -- there are better ways.
  342.  
  343. Nuked version.sh and version.c in subdirectories.
  344.  
  345. Fixed bug in handling of IGNORECASE.
  346.  
  347. Fixed bug when FIELDWIDTHS was set via -v option.
  348.  
  349. Fixed (obscure) bug when $0 is assigned a numerical value.
  350.  
  351. Fixed so that escape sequences in command-line assignments work (as it already
  352.   said in the comment).
  353.  
  354. Added a few cases to test suite.
  355.  
  356. Moved support/* back into distribution.
  357.  
  358. VMS updates.
  359.  
  360. Changes from 2.12.30 to 2.12.31
  361. -------------------------------
  362.  
  363. Cosmetic manual page changes.
  364.  
  365. Updated sunos3 config.
  366.  
  367. Small changes in test suite including renaming files over 14 chars. in length.
  368.  
  369. Changes from 2.12.29 to 2.12.30
  370. -------------------------------
  371.  
  372. Bug fix for many string concatenations in a row.
  373.  
  374. Changes from 2.12.28 to 2.12.29
  375. -------------------------------
  376.  
  377. Minor cleanup in awk.y
  378.  
  379. Minor VMS update.
  380.  
  381. Minor atari update.
  382.  
  383. Changes from 2.12.27 to 2.12.28
  384. -------------------------------
  385.  
  386. Got rid of the debugging goop in eval.c -- there are better ways.
  387.  
  388. Sequent port.
  389.  
  390. VMS changes left out of the last patch -- sigh!  config/vms.h renamed
  391.   to config/vms-conf.h.
  392.  
  393. Fixed missing/tzset.c
  394.  
  395. Removed use of gcvt() and GCVT_MISSING -- turns out it was no faster than
  396.   sprintf("%g") and caused all sorts of portability headaches.
  397.  
  398. Tuned get_field() -- it was unnecessarily parsing the whole record on reference
  399.   to $0.
  400.  
  401. Tuned interpret() a bit in the rule_node loop.
  402.  
  403. In r_force_number(), worked around bug in Uglix strtod() and got rid of 
  404.   ugly do{}while(0) at Michal's urging.
  405.  
  406. Replaced do_deref() and deref with unref(node) -- much cleaner and a bit faster.
  407.  
  408. Got rid of assign_number() -- contrary to comment, it was no faster than
  409.   just making a new node and freeing the old one.
  410.  
  411. Replaced make_number() and tmp_number() with macros that call mk_number().
  412.  
  413. Changed freenode() and newnode() into macros -- the latter is getnode()
  414.   which calls more_nodes() as necessary.
  415.  
  416. Changes from 2.12.26 to 2.12.27
  417. -------------------------------
  418.  
  419. Completion of Cray 2 port (includes a kludge for floor() and ceil()
  420.   that may go or be changed -- I think that it may just be working around
  421.   a bug in chem that is being tweaked on the Cray).
  422.  
  423. More VMS updates.
  424.  
  425. Moved kludge over yacc's insertion of malloc and realloc declarations
  426.   from protos.h to the Makefile.
  427.  
  428. Added a lisp interpreter in awk to the test suite.  (Invoked under
  429.   bigtest.)
  430.  
  431. Cleanup in r_force_number() -- I had never gotten around to a thorough
  432.   profile of the cache code and it turns out to be not worth it.
  433.  
  434. Performance boost -- do lazy force_number()'ing for fields etc. i.e.
  435.   flag them (MAYBE_NUM) and call force_number only as necessary.
  436.  
  437. Changes from 2.12.25 to 2.12.26
  438. -------------------------------
  439.  
  440. Rework of regexp stuff so that dynamic regexps have reasonable
  441.   performance -- string used for compiled regexp is stored and
  442.   compared to new string -- if same, no recompilation is necessary.
  443.   Also, very dynamic regexps cause dfa-based searching to be turned
  444.   off.
  445.  
  446. Code in dev_open() is back to returning fileno(std*) rather than
  447.   dup()ing it.  This will be documented.  Sorry for the run-around
  448.   on this.
  449.  
  450. Minor atari updates.
  451.  
  452. Minor vms update.
  453.  
  454. Missing file from MSDOS port.
  455.  
  456. Added warning (under lint) if third arg. of [g]sub is a constant and
  457.   handle it properly in the code (i.e. return how many matches).
  458.  
  459. Changes from 2.12.24 to 2.12.25
  460. -------------------------------
  461.  
  462. MSDOS port.
  463.  
  464. Non-consequential changes to regexp variables in preparation for
  465.   a more serious change to fix a serious performance problem.
  466.  
  467. Changes from 2.12.23 to 2.12.24
  468. -------------------------------
  469.  
  470. Fixed bug in output flushing introduced a few patches back.  This caused
  471.   serious performance losses.
  472.  
  473. Changes from 2.12.22 to 2.12.23
  474. -------------------------------
  475.  
  476. Accidently left config/cray2-60 out of last patch.
  477.  
  478. Added some missing dependencies to Makefile.
  479.  
  480. Cleaned up mkconf a bit; made yacc the default parser (no alloca needed,
  481.   right?); added rs6000 hook for signed characters.
  482.  
  483. Made regex.c with NO_ALLOCA undefined work.
  484.  
  485. Fixed bug in dfa.c for systems where free(NULL) bombs.
  486.  
  487. Deleted a few cant_happen()'s that *really* can't hapen.
  488.  
  489. Changes from 2.12.21 to 2.12.22
  490. -------------------------------
  491.  
  492. Added to config stuff the ability to choose YACC rather than bison.
  493.  
  494. Fixed CHAR_UNSIGNED in config.h-dist.
  495.  
  496. Second arg. of strtod() is char ** rather than const char **. 
  497.  
  498. stackb is now initially malloc()'ed since it may be realloc()'ed.
  499.  
  500. VMS updates.
  501.  
  502. Added SIZE_T_MISSING to config stuff and a default typedef to awk.h.
  503.   (Maybe it is not needed on any current systems??)
  504.  
  505. re_compile_pattern()'s size is now size_t unconditionally.
  506.  
  507. Changes from 2.12.20 to 2.12.21
  508. -------------------------------
  509.  
  510. Corrected missing/gcvt.c.
  511.  
  512. Got rid of use of dup2() and thus DUP_MISSING.
  513.  
  514. Updated config/sgi33.
  515.  
  516. Turned on (and fixed) in cmp_nodes() the behaviour that I *hope* will be in
  517.   POSIX 1003.2 for relational comparisons.
  518.  
  519. Small updates to test suite.
  520.  
  521. Changes from 2.12.19 to 2.12.20
  522. -------------------------------
  523.  
  524. Sloppy, sloppy, sloppy!!  I didn't even try to compile the last two
  525.   patches.  This one fixes goofs in regex.c.
  526.  
  527. Changes from 2.12.18 to 2.12.19
  528. -------------------------------
  529.  
  530. Cleanup of last patch.
  531.  
  532. Changes from 2.12.17 to 2.12.18
  533. -------------------------------
  534.  
  535. Makefile renamed to Makefile-dist.
  536.  
  537. Added alloca() configuration to mkconf.  (A bit kludgey.)  Just
  538.   add a single line containing ALLOCA_PW, ALLOCA_S or ALLOCA_C
  539.   to the appropriate config file to have Makefile-dist edited
  540.   accordingly.
  541.  
  542. Reorganized output flushing to correspond with new semantics of
  543.   devopen() on "/dev/std*" etc.
  544.  
  545. Fixed rest of last goof!!
  546.  
  547. Save and restore errno in do_pathopen().
  548.  
  549. Miscellaneous atari updates.
  550.  
  551. Get rid of the trailing comma in the NODETYPE definition (Cray
  552.   compiler won't take it).
  553.  
  554. Try  to make the use of `const' consistent since Cray compiler is
  555.   fussy about that.  See the changes to `basename' and `myname'.
  556.  
  557. It turns out that, according to section 3.8.3 (Macro Replacement)
  558.   of the ANSI Standard:  ``If there are sequences of preprocessing
  559.   tokens within the list of arguments that would otherwise act as
  560.   preprocessing directives, the behavior is undefined.''  That means
  561.   that you cannot count on the behavior of the declaration of
  562.   re_compile_pattern in awk.h, and indeed the Cray compiler chokes on it.
  563.  
  564. Replaced alloca with malloc/realloc/free in regex.c.  It was much simpler
  565.   than expected.  (Inside NO_ALLOCA for now -- by default no alloca.)
  566.  
  567. Added a configuration file, config/cray60, for Unicos-6.0.
  568.  
  569. Changes from 2.12.16 to 2.12.17
  570. -------------------------------
  571.  
  572. Ooops.  Goofed signal use in last patch.
  573.  
  574. Changes from 2.12.15 to 2.12.16
  575. -------------------------------
  576.  
  577. RENAMED *_dir to just * (e.g. missing_dir).
  578.  
  579. Numerous VMS changes.
  580.  
  581. Proper inclusion of atari and vms files.
  582.  
  583. Added experimental (ifdef'd out) RELAXED_CONTINUATION and DEFAULT_FILETYPE
  584.  -- please comment on these!
  585.  
  586. Moved pathopen() to io.c (sigh).
  587.  
  588. Put local directory ahead in default AWKPATH.
  589.  
  590. Added facility in mkconf to echo comments on stdout:  lines beginning
  591.   with "#echo " will have the remainder of the line echoed when mkconf is run.
  592.   Any lines starting with "#" will otherwise be treated as comments.  The
  593.   intent is to be able to say:
  594.   "#echo Make sure you uncomment alloca.c in the Makefile"
  595.   or the like.
  596.  
  597. Prototype fix for V.4
  598.  
  599. Fixed version_string to not print leading @(#).
  600.  
  601. Fixed FIELDWIDTHS to work with strict (turned out to be easy).
  602.  
  603. Fixed conf for V.2.
  604.  
  605. Changed semantics of /dev/fd/n to be like on real /dev/fd.
  606.  
  607. Several configuration and updates in the makefile.
  608.  
  609. Updated manpage.
  610.  
  611. Include tzset.c and system.c from missing_dir that were accidently left out of
  612.   the last patch.
  613.  
  614. Fixed bug in cmdline variable assignment -- arg was getting freed(!) in
  615.   call to variable.
  616.  
  617. Backed out of parse-time constant folding for now, until I can figure out
  618.   how to do it right.
  619.  
  620. Fixed devopen() so that getline <"-" works.
  621.  
  622. Changes from 2.12.14 to 2.12.15
  623. -------------------------------
  624.  
  625. Changed config/* to a condensed form that can be used with mkconf to generate
  626.   a config.h from config.h-dist -- much easier to maintain.  Please chaeck
  627.   carefully against what you had before for a particular system and report
  628.   any problems.  vms.h remains separate since the stuff at the bottom
  629.   didn't quite fit the mkconf model -- hopefully cleared up later.
  630.  
  631. Fixed bug in grammar -- didn't allow function definition to be separated from 
  632.   other rules by a semi-colon.
  633.  
  634. VMS fix to #includes in missing.c -- should we just be including awk.h?
  635.  
  636. Updated README for texinfo.tex version.
  637.  
  638. Updating of copyright in all .[chy] files.
  639.  
  640. Added but commented out Michal's fix to strftime.
  641.  
  642. Added tzset() emulation based on Rick Adams' code.  Added TZSET_MISSING to
  643.     config.h-dist.
  644.  
  645. Added strftime.3 man page for missing_dir
  646.  
  647. More posix:    func, **, **= don't work in -W posix
  648.  
  649. More lint:    ^, ^= not in old awk
  650.  
  651. gawk.1:        removed ref to -DNO_DEV_FD, other minor updating.
  652.  
  653. Style change:  pushbak becomes pushback() in yylex().
  654.  
  655. Changes from 2.12.13 to 2.12.14
  656. -------------------------------
  657.  
  658. Better (?) organization of awk.h -- attempt to keep all system dependencies
  659.   near the top and move some of the non-general things out of the config.h
  660.   files.
  661.  
  662. Change to handling of SYSTEM_MISSING.
  663.  
  664. Small change to ultrix config.
  665.  
  666. Do "/dev/fd/*" etc. checking at runtime.
  667.  
  668. First pass at VMS port.
  669.  
  670. Improvements to error handling (when lexeme spans buffers).
  671.  
  672. Fixed backslash handling -- why didn't I notice this sooner?
  673.  
  674. Added programs from book to test suite and new target "bigtest" to Makefile.
  675.  
  676. Changes from 2.12.12 to 2.12.13
  677. -------------------------------
  678.  
  679. Recognize OFS and ORS specially so that OFS = 9 works without efficiency hit.
  680.   Took advantage of opportunity to tune do_print*() for about 10% win on a
  681.   print with 5 args (i.e. small but significant).
  682.  
  683. Somewhat pervasive changes to reconcile CONVFMT vs. OFMT.
  684.  
  685. Better initialization of builtin vars.
  686.  
  687. Make config/* consistent wrt STRTOL_MISSING.
  688.  
  689. Small portability improvement to alloca.s
  690.  
  691. Improvements to lint code in awk.y
  692.  
  693. Replaced strtol() with a better one by Chris Torek.
  694.  
  695. Changes from 2.12.11 to 2.12.12
  696. -------------------------------
  697.  
  698. Added PORTS file to record successful ports.
  699.  
  700. Added #define const to nothing if not STDC and added const to strtod() header.
  701.  
  702. Added * to printf capabilities and partially implemented ' ' and '+' (has an
  703.   effect for %d only, silently ignored for other formats).  I'm afraid that's
  704.   as far as I want to go before I look at a complete replacement for
  705.   do_sprintf().
  706.  
  707. Added warning for /regexp/ on LHS of MATCHOP.
  708.  
  709. Changes from 2.12.10 to 2.12.11
  710. -------------------------------
  711.  
  712. Small Makefile improvements.
  713.  
  714. Some remaining nits from the NeXT port.
  715.  
  716. Got rid of bcopy() define in awk.h -- not needed anymore (??)
  717.  
  718. Changed private in builtin.c -- it is special on Sequent.
  719.  
  720. Added subset implementation of strtol() and STRTOL_MISSING.
  721.  
  722. A little bit of cleanup in debug.c, dfa.c.
  723.  
  724. Changes from 2.12.9 to 2.12.10
  725. ------------------------------
  726.  
  727. Redid compatability checking and checking for # of args.
  728.  
  729. Removed all references to variables[] from outside awk.y, in preparation
  730.   for a more abstract interface to the symbol table.
  731.  
  732. Got rid of a remaining use of bcopy() in regex.c.
  733.  
  734. Changes from 2.12.8 to 2.12.9
  735. -----------------------------
  736.  
  737. Portability improvements for atari, next and decstation.
  738.  
  739. Bug fix in substr() -- wasn't handling 3rd arg. of -1 properly.
  740.  
  741. Manpage updates.
  742.  
  743. Moved support from src release to doc release.
  744.  
  745. Updated FUTURES file.
  746.  
  747. Added some "lint" warnings.
  748.  
  749. Changes from 2.12.7 to 2.12.8
  750. -----------------------------
  751.  
  752. Changed time() to systime().
  753.  
  754. Changed warning() in snode() to fatal().
  755.  
  756. strftime() now defaults second arg. to current time.
  757.  
  758. Changes from 2.12.6 to 2.12.7
  759. -----------------------------
  760.  
  761. Fixed bug in sub_common() involving inadequate allocation of a buffer.
  762.  
  763. Added some missing files to the Makefile.
  764.  
  765. Changes from 2.12.5 to 2.12.6
  766. -----------------------------
  767.  
  768. Fixed bug wherein non-redirected getline could call iop_close() just
  769.   prior to a call from do_input().
  770.  
  771. Fixed bug in handling of /dev/stdout and /dev/stderr.
  772.  
  773. Changes from 2.12.4 to 2.12.5
  774. -----------------------------
  775.  
  776. Updated README and support directory.
  777.  
  778. Changes from 2.12.3 to 2.12.4
  779. -----------------------------
  780.  
  781. Updated CHANGES and TODO (should have been done in previous 2 patches).
  782.  
  783. Changes from 2.12.2 to 2.12.3
  784. -----------------------------
  785.  
  786. Brought regex.c and alloca.s into line with current FSF versions.
  787.  
  788. Changes from 2.12.1 to 2.12.2
  789. -----------------------------
  790.  
  791. Portability improvements; mostly moving system prototypes out of awk.h
  792.  
  793. Introduction of strftime.
  794.  
  795. Use of CONVFMT.
  796.  
  797. Changes from 2.12 to 2.12.1
  798. -----------------------------
  799.  
  800. Consolidated treatment of command-line assignments (thus correcting the
  801. -v treatment).
  802.  
  803. Rationalized builtin-variable handling into a table-driven process, thus
  804. simplifying variable() and eliminating spc_var().
  805.  
  806. Fixed bug in handling of command-line source that ended in a newline.
  807.  
  808. Simplified install() and lookup().
  809.  
  810. Did away with double-mallocing of identifiers and now free second and later
  811. instances of a name, after the first gets installed into the symbol table.
  812.  
  813. Treat IGNORECASE specially, simplifying a lot of code, and allowing
  814. checking against strict conformance only on setting it, rather than on each
  815. pattern match.
  816.  
  817. Fixed regexp matching when IGNORECASE is non-zero (broken when dfa.c was 
  818. added).
  819.  
  820. Fixed bug where $0 was not being marked as valid, even after it was rebuilt.
  821. This caused mangling of $0.
  822.  
  823.  
  824. Changes from 2.11.1 to 2.12
  825. -----------------------------
  826.  
  827. Makefile:
  828.  
  829. Portability improvements in Makefile.
  830. Move configuration stuff into config.h
  831.  
  832. FSF files:
  833.  
  834. Synchronized alloca.[cs] and regex.[ch] with FSF.
  835.  
  836. array.c:
  837.  
  838. Rationalized hash routines into one with a different algorithm.
  839. delete() now works if the array is a local variable.
  840. Changed interface of assoc_next() and avoided dereferencing past the end of the
  841.   array.
  842.  
  843. awk.h:
  844.  
  845. Merged non-prototype and prototype declarations in awk.h.
  846. Expanded tree_eval #define to short-circuit more calls of r_tree_eval().
  847.  
  848. awk.y:
  849.  
  850. Delinted some of the code in the grammar.
  851. Fixed and improved some of the error message printing.
  852. Changed to accomodate unlimited length source lines.
  853. Line continuation now works as advertised.
  854. Source lines can be arbitrarily long.
  855. Refined grammar hacks so that /= assignment works.  Regular expressions
  856.   starting with /= are recognized at the beginning of a line, after && or ||
  857.   and after ~ or !~.  More contexts can be added if necessary.
  858. Fixed IGNORECASE (multiple scans for backslash).
  859. Condensed expression_lists in array references.
  860. Detect and warn for correct # args in builtin functions -- call most of them
  861.   with a fixed number (i.e. fill in defaults at parse-time rather than at
  862.   run-time).
  863. Load ENVIRON only if it is referenced (detected at parse-time).
  864. Treat NF, FS, RS, NR, FNR specially at parse time, to improve run time.
  865. Fold constant expressions at parse time.
  866. Do make_regexp() on third arg. of split() at parse tiem if it is a constant.
  867.  
  868. builtin.c:
  869.  
  870. srand() returns 0 the first time called.
  871. Replaced alloca() with malloc() in do_sprintf().
  872. Fixed setting of RSTART and RLENGTH in do_match().
  873. Got rid of get_{one,two,three} and allowance for variable # of args. at
  874.   run-time -- this is now done at parse-time.
  875. Fixed latent bug in [g]sub whereby changes to $0 would never get made.
  876. Rewrote much of sub_common() for simplicity and performance.
  877. Added ctime() and time() builtin functions (unless -DSTRICT).  ctime() returns
  878.   a time string like the C function, given the number of seconds since the epoch
  879.   and time() returns the current time in seconds.
  880. do_sprintf() now checks for mismatch between format string and number of
  881.   arguments supplied.
  882.  
  883. dfa.c
  884.  
  885. This is borrowed (almost unmodified) from GNU grep to provide faster searches.
  886.  
  887. eval.c
  888.  
  889. Node_var, Node_var_array and Node_param_list handled from macro rather
  890.   than in r_tree_eval().
  891. Changed cmp_nodes() to not do a force_number() -- this, combined with a 
  892.     force_number() on ARGV[] and ENVIRON[] brings it into line with other awks
  893. Greatly simplified cmp_nodes().
  894. Separated out Node_NF, Node_FS, Node_RS, Node_NR and Node_FNR in get_lhs().
  895. All adjacent string concatenations now done at once.
  896.  
  897. field.c
  898.  
  899. Added support for FIELDWIDTHS.
  900. Fixed bug in get_field() whereby changes to a field were not always
  901.   properly reflected in $0.
  902. Reordered tests in parse_field() so that reference off the end of the buffer
  903.   doesn't happen.
  904. set_FS() now sets *parse_field i.e. routine to call depending on type of FS.
  905. It also does make_regexp() for FS if needed.  get_field() passes FS_regexp
  906.   to re_parse_field(), as does do_split().
  907. Changes to set_field() and set_record() to avoid malloc'ing and free'ing the
  908.   field nodes repeatedly.  The fields now just point into $0 unless they are
  909.   assigned to another variable or changed.  force_number() on the field is
  910.   *only* done when the field is needed.
  911.  
  912. gawk.1
  913.  
  914. Fixed troff formatting problem on .TP lines.
  915.  
  916. io.c
  917.  
  918. Moved some code out into iop.c.
  919. Output from pipes and system() calls is properly synchronized.
  920. Status from pipe close properly returned.
  921. Bug in getline with no redirect fixed.
  922.  
  923. iop.c
  924.  
  925. This file contains a totally revamped get_a_record and associated code.
  926.  
  927. main.c
  928.  
  929. Command line programs no longer use a temporary file.
  930. Therefore, tmpnam() no longer required.
  931. Deprecated -a and -e options -- they will go away in the next release,
  932.   but for now they cause a warning.
  933. Moved -C, -V, -c options to -W ala posix.
  934. Added -W posix option: throw out \x
  935. Added -W lint option.
  936.  
  937.  
  938. node.c
  939.  
  940. force_number() now allows pure numerics to have leading whitespace.
  941. Added make_string facility to optimize case of adding an already malloc'd
  942.   string.
  943. Cleaned up and simplified do_deref().
  944. Fixed bug in handling of stref==255 in do_deref().
  945.  
  946. re.c
  947.  
  948. contains the interface to regexp code
  949.  
  950. Changes from 2.11.1 to FSF version of same
  951. ------------------------------------------
  952. Thu Jan  4 14:19:30 1990  Jim Kingdon  (kingdon at albert)
  953.  
  954.     * Makefile (YACC): Add -y to bison part.
  955.  
  956.     * missing.c: Add #include <stdio.h>.
  957.  
  958. Sun Dec 24 16:16:05 1989  David J. MacKenzie  (djm at hobbes.ai.mit.edu)
  959.  
  960.     * * Makefile: Add (commented out) default defines for Sony News.
  961.  
  962.     * awk.h: Move declaration of vprintf so it will compile when
  963.     -DVPRINTF_MISSING is defined.
  964.  
  965. Mon Nov 13 18:54:08 1989  Robert J. Chassell  (bob at apple-gunkies.ai.mit.edu)
  966.  
  967.         * gawk.texinfo: changed @-commands that are not part of the
  968.           standard, currently released texinfmt.el to those that are.
  969.           Otherwise, only people with the as-yet unreleased makeinfo.c can
  970.           format this file.
  971.  
  972. Changes from 2.11beta to 2.11.1 (production)
  973. --------------------------------------------
  974.  
  975. Went from "beta" to production status!!!
  976.  
  977. Now flushes stdout before closing pipes or redirected files to
  978. synchonize output.
  979.  
  980. MS-DOS changes added in.
  981.  
  982. Signal handler return type parameterized in Makefile and awk.h and
  983. some lint removed.  debug.c cleaned up.
  984.  
  985. Fixed FS splitting to never match null strings, per book.
  986.  
  987. Correction to the manual's description of FS.
  988.  
  989. Some compilers break on char *foo = "string" + 4 so fixed version.sh and
  990. main.c.
  991.  
  992. Changes from 2.10beta to 2.11beta
  993. ---------------------------------
  994.  
  995. This release fixes all reported bugs that we could reproduce.  Probably
  996. some of the changes are not documented here.
  997.  
  998. The next release will probably not be a beta release!
  999.  
  1000. The most important change is the addition of the -nostalgia option. :-)
  1001.  
  1002. The documentation has been improved and brought up-to-date.
  1003.  
  1004. There has been a lot of general cleaning up of the code that is not otherwise
  1005. documented here.  There has been a movement toward using standard-conforming
  1006. library routines and providing them (in missing.d) for systems lacking them.
  1007. Improved (hopefully) configuration through Makfile modifications and missing.c.
  1008. In particular, straightened out confusion over vprintf #defines, declarations
  1009. etc.
  1010.  
  1011. Deleted RCS log comments from source, to reduce source size by about one third.
  1012. Most of them were horribly out-of-date, anyway.
  1013.  
  1014. Renamed source files to reflect (for the most part) their contents.
  1015.  
  1016. More and improved error messages.  Cleanup and fixes to yyerror().
  1017. String constants are not altered in input buffer, so error messages come out 
  1018. better.  Fixed usage message.  Make use of ANSI C strerror() function
  1019. (provided).
  1020.  
  1021. Plugged many more memory leaks.  The memory consumption is now quite
  1022. reasonable over a wide range of programs.
  1023.  
  1024. Uses volatile declaration if STDC > 0 to avoid problems due to longjmp.
  1025.  
  1026. New -a and -e options to use awk or egrep style regexps, respectively,
  1027. since POSIX says awk should use egrep regexps.  Default is -a.
  1028.  
  1029. Added -v option for setting variables before the first file is encountered.
  1030. Version information now uses -V and copyleft uses -C.
  1031.  
  1032. Added a patchlevel.h file and its use for -V and -C.
  1033.  
  1034. Append_right() optimized for major improvement to programs with a *lot*
  1035. of statements.
  1036.  
  1037. Operator precedence has been corrected to match draft Posix.
  1038.  
  1039. Tightened up grammar for builtin functions so that only length
  1040. may be called without arguments or parentheses.
  1041.  
  1042. /regex/ is now a normal expression that can appear in any expression
  1043. context.
  1044.  
  1045. Allow /= to begin a regexp.  Allow ..[../..].. in a regexp.
  1046.  
  1047. Allow empty compound statements ({}).
  1048.  
  1049. Made return and next illegal outside a function and in BEGIN/END respectively.
  1050.  
  1051. Division by zero is now illegal and causes a fatal error.
  1052.  
  1053. Fixed exponentiation so that x ^ 0 and x ^= 0 both return 1.
  1054.  
  1055. Fixed do_sqrt, do_log, and do_exp to do argument/return checking and
  1056. print an error message, per the manual.
  1057.  
  1058. Fixed main to catch SIGSEGV to get source and data file line numbers.
  1059.  
  1060. Fixed yyerror to print the ^ at the beginning of the bad token, not the end.
  1061.  
  1062. Fix to substr() builtin:  it was failing if the arguments
  1063. weren't already strings.
  1064.  
  1065. Added new node value flag NUMERIC to indicate that a variable is
  1066. purely a number as opposed to type NUM which indicates that
  1067. the node's numeric value is valid.  This is set in make_number(),
  1068. tmp_number and r_force_number() when appropriate and used in
  1069. cmp_nodes().  This fixed a bug in comparison of variables that had
  1070. numeric prefixes.  The new code uses strtod() and eliminates is_a_number().
  1071. A simple strtod() is provided for systems lacking one.  It does no
  1072. overflow checking, so could be improved.
  1073.  
  1074. Simplification and efficiency improvement in force_string.
  1075.  
  1076. Added performance tweak in r_force_number().
  1077.  
  1078. Fixed a bug with nested loops and break/continue in functions.
  1079.  
  1080. Fixed inconsistency in handling of empty fields when $0 has to be rebuilt.
  1081. Happens to simplify rebuild_record().
  1082.  
  1083. Cleaned up the code associated with opening a pipe for reading.  Gawk
  1084. now has its own popen routine (gawk_popen) that allocates an IOBUF
  1085. and keeps track of the pid of the child process.  gawk_pclose
  1086. marks the appropriate child as defunct in the right struct redirect.
  1087.  
  1088. Cleaned up and fixed close_redir().
  1089.  
  1090. Fixed an obscure bug to do with redirection.  Intermingled ">" and ">>"
  1091. redirects did not output in a predictable order.
  1092.  
  1093. Improved handling of output bufferring:  now all print[f]s redirected to a tty
  1094. or pipe are flushed immediately and non-redirected output to a tty is flushed
  1095. before the next input record is read.
  1096.  
  1097. Fixed a bug in get_a_record() where bcopy() could have copied over
  1098. a random pointer.
  1099.  
  1100. Fixed a bug when RS="" and records separated by multiple blank lines.
  1101.  
  1102. Got rid of SLOWIO code which was out-of-date anyway.
  1103.  
  1104. Fix in get_field() for case where $0 is changed and then $(n) are
  1105. changed and then $0 is used.
  1106.  
  1107. Fixed infinite loop on failure to open file for reading from getline.
  1108. Now handles redirect file open failures properly.
  1109.  
  1110. Filenames such as /dev/stdin now allowed on the command line as well as
  1111. in redirects.
  1112.  
  1113. Fixed so that gawk '$1' where $1 is a zero tests false.
  1114.  
  1115. Fixed parsing so that `RLENGTH -1' parses the same as `RLENGTH - 1',
  1116. for example.
  1117.  
  1118. The return from a user-defined function now defaults to the Null node.
  1119. This fixes a core-dump-causing bug when the return value  of a function
  1120. is used and that function returns no value.
  1121.  
  1122. Now catches floating point exceptions to avoid core dumps.
  1123.  
  1124. Bug fix for deleting elements of an array -- under some conditions, it was
  1125. deleting more than one element at a time.
  1126.  
  1127. Fix in AWKPATH code for running off the end of the string.
  1128.  
  1129. Fixed handling of precision in *printf calls.  %0.2d now works properly,
  1130. as does %c.  [s]printf now recognizes %i and %X.
  1131.  
  1132. Fixed a bug in printing of very large (>240) strings.
  1133.  
  1134. Cleaned up erroneous behaviour for RS == "".
  1135.  
  1136. Added IGNORECASE support to index().
  1137.  
  1138. Simplified and fixed newnode/freenode.
  1139.  
  1140. Fixed reference to $(anything) in a BEGIN block.
  1141.  
  1142. Eliminated use of USG rand48().
  1143.  
  1144. Bug fix in force_string for machines with 16-bit ints.
  1145.  
  1146. Replaced use of mktemp() with tmpnam() and provided a partial implementation of
  1147. the latter for systems that don't have it.
  1148.  
  1149. Added a portability check for includes in io.c.
  1150.  
  1151. Minor portability fix in alloc.c plus addition of xmalloc().
  1152.  
  1153. Portability fix:  on UMAX4.2, st_blksize is zero for a pipe, thus breaking
  1154. iop_alloc() -- fixed.
  1155.  
  1156. Workaround for compiler bug on Sun386i in do_sprintf.
  1157.  
  1158. More and improved prototypes in awk.h.
  1159.  
  1160. Consolidated C escape parsing code into one place.
  1161.  
  1162. strict flag is now turned on only when invoked with compatability option.
  1163. It now applies to fewer things.
  1164.  
  1165. Changed cast of f._ptr in vprintf.c from (unsigned char *) to (char *).
  1166. Hopefully this is right for the systems that use this code (I don't).
  1167.  
  1168. Support for pipes under MSDOS added.
  1169.